﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Team.aspx.cs" Inherits="WebSite.Admin.Admin_Team" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link  href="skin_1.0/css/base.css" rel="stylesheet" type="text/css" media="all" />
<script src="skin_1.0/js/jQuery.1.2.6.js"  type="text/javascript"  charset="gb2312"></script>
<script src="skin_1.0/js/Function.js" type="text/javascript" charset="gb2312"></script>
<script src="skin_1.0/js/Validator.js" type="text/javascript" charset="gb2312"></script>
<link  href="skin_1.0/js/FaceBox/FaceBox.1.2.css" rel="stylesheet" type="text/css" media="all" />
<script src="skin_1.0/js/FaceBox/FaceBox.1.2.js" type="text/javascript"  charset="gb2312"></script>
<script type="text/javascript">
<!--
$(document).ready(function($){
	$("a[rel*=facebox]").facebox();
	$("#modWindow").css("display","none");
});

function del(i)
{
	var url = document.URL;
    if (url.substring(url.length - 1, url.length) == "&") {
     url = url.substring(0,url.length - 1);
    }
	if (window.confirm("你确定要删除吗?")) {
            if (url.indexOf("?") > 0) {
                window.location = url + "&act=del&id=" + i;
            } else {
                window.location = url + "?act=del&id=" + i;
            }
        }
}

function mod(id)
{
	$("#ModId").attr("readOnly","false");
	setvalue(id);
	$("#ModId").attr("readOnly","true");
	SetPization();
}


function SetPization()
{


}


function Add()
{
	$("#ModId").attr("readOnly","false");
	clearValue();
	$("#ModId").val("0");
	$("#ModId").attr("readOnly","true");
	$("#ModCreateTime").val("<%=DateTime.Now%>");
}

function clearValue()
{
	$("#ModId").val("");
	$("#ModTeamName").val("");
	$("#ModTeamHeadImg").val("");
	$("#ModTeamVoteNum").val("");
	$("#ModBabyAId").val("");
	$("#ModBabyBId").val("");
	$("#ModBabyAName").val("");
	$("#ModBabyBName").val("");
	$("#ModStatus").val("");
	$("#ModCreateTime").val("");
	$("#ModIp").val("");
	$("#ModType").val("");
	$("#ModOrderBy").val("");
	$("#ModVideoUrl").val("");
	$("#ModTotalScore").val("");
}
function setvalue(id)
{
	$("#ModId").val($("#TDId"+id).text());
	$("#ModTeamName").val($("#TDTeamName"+id).text());
	$("#ModTeamHeadImg").val($("#TDTeamHeadImg"+id).text());
	$("#ModTeamVoteNum").val($("#TDTeamVoteNum"+id).text());
	$("#ModBabyAId").val($("#TDBabyAId"+id).text());
	$("#ModBabyBId").val($("#TDBabyBId"+id).text());
	$("#ModBabyAName").val($("#TDBabyAName"+id).text());
	$("#ModBabyBName").val($("#TDBabyBName"+id).text());
	$("#ModStatus").val($("#TDStatus"+id).text());
	$("#ModCreateTime").val($("#TDCreateTime"+id).text());
	$("#ModIp").val($("#TDIp"+id).text());
	$("#ModType").val($("#TDType"+id).text());
	$("#ModOrderBy").val($("#TDOrderBy"+id).text());
	$("#ModVideoUrl").val($("#TDVideoUrl" + id).text());
	$("#ModTotalScore").val($("#TDTotalScore" + id).text());
}




jQuery.fn.extend({
  check: function() {
    return this.each(function() { this.checked = true; });
  },
  uncheck: function() {
    return this.each(function() { this.checked = !this.checked; });
  }
});

function  CheckAll()
{
	$("input[@type=checkbox]").check();
}

function UnCheckAll()
{
	$("input[@type=checkbox]").uncheck();
}
//-->
</script>
</head>

<body leftmargin="8" topmargin="8" >

<table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA" align="center">
<tr>
 <td height="26" >
  <table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td align="center">
    <a href="#modWindow" rel="facebox"><input type='button' class="coolbg np" onclick="Add();" value='添加' /></a>
 </td>
 </tr>
</table>
</td>
</tr>
</table>

<form name='form3' action='' method='get'>
<table width='98%'  border='0' cellpadding='1' cellspacing='1' bgcolor='#CBD8AC' align="center" style="margin-top:8px">
  <tr bgcolor='#EEF4EA'>
    <td  align='center'>
      <table border='0' cellpadding='0' cellspacing='0'>
	
						<tr>
							<td>Id: <input type="text" class="text" name="searchId" />&nbsp;&nbsp;</td>
							<td>宝宝帮名称: <input type="text" class="text" name="searchTeamName" />&nbsp;&nbsp;</td>							
							<td>宝宝帮投票数: <input type="text" class="text" name="searchTeamVoteNum" />&nbsp;&nbsp;</td>
							<td>宝宝Aid: <input type="text" class="text" name="searchBabyAId" />&nbsp;&nbsp;</td>
							<td>宝宝Bid: <input type="text" class="text" name="searchBabyBId" />&nbsp;&nbsp;</td>
                        </tr>
                        <tr>
							<td>宝宝A名称: <input type="text" class="text" name="searchBabyAName" />&nbsp;&nbsp;</td>
							<td>宝宝B名称: <input type="text" class="text" name="searchBabyBName" />&nbsp;&nbsp;</td>
							<td>状态: <input type="text" class="text" name="searchStatus" />&nbsp;&nbsp;</td>														
							<td>类别: <input type="text" class="text" name="searchType" />&nbsp;&nbsp;</td>
                            <td>排序: <input type="text" class="text" name="searchOrderBy" />&nbsp;&nbsp;</td>                 
					</tr>
					<tr><td colspan="14">
							同时导出: <input type="checkbox" class="text" name="toExcel" value="1" />&nbsp;&nbsp;&nbsp;
							<input type="submit" name="Search" value="查询" />							  
							</td></tr>
      </table>
    </td>
  </tr>
</table>
</form>


<form action="" method="post" id="form2">


<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
<tr bgcolor="#E7E7E7">
	<td height="24" colspan="20" >&nbsp;信息列表&nbsp;</td>
</tr>
<tr align="center" bgcolor="#FAFAF1" height="22">
<td>选择</td>
		<td> Id </td>
		<td> 宝宝帮名称 </td>
		<td> 宝宝帮头像 </td>
		<td> 宝宝帮投票数 </td>
		<td> 宝宝Aid </td>
		<td> 宝宝Bid </td>
		<td> 宝宝A名称 </td>
		<td> 宝宝B名称 </td>
		<td> 状态 </td>
		<td> 时间 </td>
		<td> Ip </td>
        <td> 总分</td>
		<td> 类别 </td>
		<td> OrderBy </td>
		<td> 视频链接 </td>
<td>操作</td>
</tr>    
<asp:Repeater ID="DataList" runat="server">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
	<td><input name="SelectID" type="checkbox" id="SelectID" value="<%#Eval("Id") %>" class="np">
	<div style="display:none" id="TDID<%#Eval("Id")%>"><%#Eval("Id")%></div>
	</td>
		<td id="TDId<%#Eval("Id") %>"><%#Eval("Id")%></td>
		<td id="TDTeamName<%#Eval("Id") %>"><%#Eval("TeamName")%></td>
		<td id="TDTeamHeadImg<%#Eval("Id") %>"><%#Eval("TeamHeadImg")%></td>
		<td id="TDTeamVoteNum<%#Eval("Id") %>"><%#Eval("TeamVoteNum")%></td>
		<td id="TDBabyAId<%#Eval("Id") %>"><%#Eval("BabyAId")%></td>
		<td id="TDBabyBId<%#Eval("Id") %>"><%#Eval("BabyBId")%></td>
		<td id="TDBabyAName<%#Eval("Id") %>"><%#Eval("BabyAName")%></td>
		<td id="TDBabyBName<%#Eval("Id") %>"><%#Eval("BabyBName")%></td>
		<td id="TDStatus<%#Eval("Id") %>"><%#Eval("Status")%></td>
		<td id="TDCreateTime<%#Eval("Id") %>"><%#Eval("CreateTime")%></td>
		<td id="TDIp<%#Eval("Id") %>"><%#Eval("Ip")%></td>
        <td id="TDTotalScore<%#Eval("Id")%>"><%#Eval("TotalScore")%></td>
		<td id="TDType<%#Eval("Id") %>"><%#Eval("Type")%></td>
		<td id="TDOrderBy<%#Eval("Id") %>"><%#Eval("OrderBy")%></td>
		<td id="TDVideoUrl<%#Eval("Id") %>"><%#Eval("VideoUrl")%></td>
	<td><a href="#modWindow" rel="facebox" onclick="mod(<%#Eval("Id") %>);">修改</a> | <a href="javascript:del(<%#Eval("Id") %>);">删除</a></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>

<tr bgcolor="#FAFAF1">
<td height="20" colspan="20">
	&nbsp;
	
	<table width="100%">
	    <tr>
	        <td>
	            <input type="button" name="seltall" class="coolbg" onclick="CheckAll();" value="全选" id="Submit4" />
	            <input type="button" name="unseltall" class="coolbg" onclick="UnCheckAll();" value="取消全选" id="Button1" />
	            <input type="submit" name="delete" class="coolbg" onclick="return window.confirm('确定要删除选择的记录吗？')" value="删除" id="Submit1" />
				<input type="submit" name="pingbi" class="coolbg" onclick="return window.confirm('确定要屏蔽选择的记录吗')" value="屏蔽" id="Submit2" />
				<input type="submit" name="fabu" class="coolbg" onclick="return window.confirm('确定要发布选择的记录吗？')" value="发布" id="Submit3" />
	            
	        </td>
	        <td align="right">
	            <asp:Label ID="sPage" runat="server"></asp:Label>
	        </td>
	    </tr>
	</table>
	
</td>

</tr>

</table>

</form>





<div id="modWindow">
<form name="formImage" method="post" enctype= "multipart/form-data"  action="">
	<table border="0" cellpadding="5" style="border:1px solid #0C581B; width:370px; line-height:25px;">
		
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				Id
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModId" name="ModId" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				宝宝帮名称
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModTeamName" name="ModTeamName" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				宝宝帮头像
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModTeamHeadImg" name="ModTeamHeadImg" />
				</td>
			</tr>

            <tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				上传新图片
				</td>
				<td colspan="1">
				<input id="uploadHeadImageFile" type="file" name="uploadHeadImageFile" />
				</td>
			</tr>

			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				宝宝帮投票数
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModTeamVoteNum" name="ModTeamVoteNum" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				宝宝Aid
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModBabyAId" name="ModBabyAId" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				宝宝Bid
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModBabyBId" name="ModBabyBId" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				宝宝A名称
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModBabyAName" name="ModBabyAName" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				宝宝B名称
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModBabyBName" name="ModBabyBName" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				状态
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModStatus" name="ModStatus" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				时间
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModCreateTime" name="ModCreateTime" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				Ip
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModIp" name="ModIp" />
				</td>
			</tr>
            <tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				分数
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModTotalScore" name="ModTotalScore" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				类别
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModType" name="ModType" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				OrderBy
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModOrderBy" name="ModOrderBy" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				视频链接
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModVideoUrl" name="ModVideoUrl" />
				</td>
			</tr>
			
		<tr bgcolor="#F0EAE1">
			<td colspan="2" align="center"><input type="submit" name="submit3" value="提交" style="height:18px; cursor:pointer; " /></td>
		</tr>
	</table>
</form>
</div>
<div style="color:Red">
    <ul>
        <li>type=0	线上41名往后，只显示票数</li>
        <li>type=1	线上第23-40名（没晋级的）</li>
        <li>type=2	线上前22名，晋级的</li>
        <li>type=10 线下城市晋级的 上海</li>
        <li>type=11 线下城市晋级的 沈阳</li>
        <li>type=12 线下城市晋级的 北京</li>
        <li>type=13 线下城市晋级的 深圳</li>
        <li>type=14 线下城市晋级的 宁波</li>
        <li>type=15 线下城市晋级的 成都</li>
    </ul>
</div>
</body>
</html>

